{% extends "base.html" %}
{% load url from future %}
{% block title_base %}登录 | {{ block.super }}{% endblock %}
{% block content_base %}

{% if form.errors %}
<p>
	帐号或密码错误,请重试.
</p>
{% endif %}
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
	{% csrf_token %}
	<table>
		<tr>
			<td>{{ form.username.label_tag }}</td>
			<td>{{ form.username }}</td>
		</tr>
		<tr>
			<td>{{ form.password.label_tag }}</td>
			<td>{{ form.password }}</td>
		</tr>
	</table>
	<input type="submit" value="登录" />
	{% if next %}
	<input type="hidden" name="next" value="{{ next }}" />
	{% else %}
	<input type="hidden" name="next" value="/" />
	{% endif %}
</form>
{% endblock %}